package com.fileshare.web.dto.Vo;

import lombok.Getter;
import lombok.Setter;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

@Setter
@Getter
public class UeditorConfigVo {
    // 上传图片配置项
    private String imageActionName = "image";
    private String imageFieldName = "image";
    private Integer imageMaxSize = 1024 * 1024 * 10;
    private List<String> imageAllowFiles = Arrays.asList(".jpg", ".png", ".jpeg");
    private Boolean imageCompressEnable = true;
    private Integer imageCompressBorder = 5000;
    private String imageInsertAlign = "none";
    private String imageUrlPrefix = "";

    // 涂鸦图片上传配置项
    private String scrawlActionName = "crawl";
    private String scrawlFieldName = "crawl";
    private Integer scrawlMaxSize = 1024 * 1024 * 10;
    private String scrawlUrlPrefix = "";
    private String scrawlInsertAlign = "none";

    // 截图工具上传
    private String snapscreenActionName = "snap";
    private String snapscreenUrlPrefix = "";
    private String snapscreenInsertAlign = "none";

    // 抓取
    private List<String> catcherLocalDomain = Arrays.asList("127.0.0.1", "localhost");
    private String catcherActionName = "catch";
    private String catcherFieldName = "catch";
    private String catcherUrlPrefix = "";
    private Integer catcherMaxSize = 1024 * 1024 * 10;
    private List<String> catcherAllowFiles = Arrays.asList(".jpg", ".png", ".jpeg");

    // 上传视频配置
    private String videoActionName = "video";
    private String videoFieldName = "video";
    private String videoUrlPrefix = "";
    private Integer videoMaxSize = 1024 * 1024 * 100;
    private List<String> videoAllowFiles = Collections.singletonList(".mp4");

    // 上传文件配置
    private String fileActionName = "file";
    private String fileFieldName = "file";
    private String fileUrlPrefix = "";
    private Integer fileMaxSize = 1024 * 1024 * 100;
    private List<String> fileAllowFiles = Arrays.asList(".zip", ".pdf", ".doc");

    // 列出图片
    private String imageManagerActionName = "listImage";
    private Integer imageManagerListSize = 20;
    private String imageManagerUrlPrefix = "";
    private String imageManagerInsertAlign = "none";
    private List<String> imageManagerAllowFiles = Arrays.asList(".jpg", ".png", ".jpeg");

    // 列出指定目录下的文件
    private String fileManagerActionName = "listFile";
    private String fileManagerUrlPrefix = "";
    private Integer fileManagerListSize = 20;
    private List<String> fileManagerAllowFiles = Arrays.asList(".zip", ".pdf", ".doc");
}
